package com.chhlz.module.base.action;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.chhlz.module.base.model.BillDish;
import com.chhlz.module.service.BillDishService;

@Controller
@Action(value = "billDish", results = { @Result(name = "billDish", location = "bill.html") })
@Scope("session")
@InterceptorRef("defaultStack")
public class BillDishAction extends BasicDataAction<BillDish>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7089081699971300338L;
	private static final Logger LOGGER = Logger.getLogger(BillDishAction.class);
	
	@Autowired
	private BillDishService billDishService;
	private BillDish billDish;
	
	public BillDish getBillDish() {
		return billDish;
	}

	public void setBillDish(BillDish billDish) {
		this.billDish = billDish;
	}

	public void add(){
		LOGGER.info("bill dish action, add, " + this.billDish);
		System.out.println("bill dish action, add, " + this.billDish);
		super.add(billDishService, billDish);
	}

}
